/*
 * @Copyright: EasyCompany 2021
 * @Author: asterisk
 * @Date: 2021-03-15 16:31:18
 * @Description: 
 */

import '../../easy_log.dart';

class EasyLogMessage implements EasyLogRecord {
  final Map<String, String> tags;
  final int timestamp;
  final EasyLogLevel level;
  final dynamic error;
  final StackTrace trace;
  final Object message;
  const EasyLogMessage(
      {this.tags,
      this.timestamp,
      this.level,
      this.error,
      this.trace,
      this.message});

  @override
  String toString() {
    var content = (message is String) ? message : message.toString();
    return 'timestamp: $timestamp, level: $level, tags: ${tags.toString()}, message: $content';
  }
}
